package com.buli.blmall.admin.core.horder;

import com.buli.blmall.admin.common.domain.SysLoginUser;

/**
 * 登录用户信息
 * @author xiang.gao
 * @date 2024/12/24 18:09
 */
public class LoginUserHolder {

    private static final ThreadLocal<SysLoginUser> HOLDER = new InheritableThreadLocal<>();

    public static SysLoginUser get() {
        return HOLDER.get();
    }

    public static void set(SysLoginUser sysLoginUser) {
        HOLDER.set(sysLoginUser);
    }

    public static void remove() {
        HOLDER.remove();
    }

}
